

export const isExternalLink = (path: string): boolean => {
	return /^(https?:|mailto:|tel:)/.test(path)
}


export const mobileRegExp = /^1[3456789]\d{9}$/

export const validateMobile = ( value: any, callback: (e?: Error) => any) => {
	if (mobileRegExp.test(value)) {
		callback()
	} else {
		callback(new Error('手机号格式不正确'))
	}
}
